package Coding.Exception;

public class TryCatch3 {
    public static void main(String[] args) {

        System.out.println("程序开始了");
        try {
            String str = "";
            System.out.println(str.toLowerCase());

            System.out.println(str.charAt(0));

        } catch (NullPointerException | StringIndexOutOfBoundsException e) {
            System.out.println("出现了空指针，已经处理了");
        }
        System.out.println("结束了");


    }
}
